package com.xiaotao.realtimeui.utils;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class RedisUtils {
    private static RedisTemplate<String, Object> redisTemplate;

    RedisUtils(RedisTemplate<String, Object> redisTemplate) {
        RedisUtils.redisTemplate = redisTemplate;
    }


    public static void increment(String key, Long value) {
        RedisUtils.redisTemplate.opsForValue().increment(key, value);
    }
}
